<?php

//数据库连接信息
$qq_dbhost = 'localhost';
$qq_dbname = 'test';
$qq_dbuser = 'ttjj';
$qq_dbpwd = 'ttjj';

$conn=mysql_connect($qq_dbhost,$qq_dbuser,$qq_dbpwd) or die(mysql_error());
mysql_query("set names utf8",$conn) or die("charset error:".mysql_error());;
mysql_select_db("$qq_dbname",$conn) or die("dbname error:".mysql_error());

?>